{% extends "admin/base.html" %}

{% block title %}系統設置 - 管理後台{% endblock %}

{% block page_title %}系統設置{% endblock %}

{% block content %}
<div class="row">
    <!-- 修改密码 -->
    <div class="col-md-6">
        <div class="card">
            <div class="card-header">
                <h5 class="card-title mb-0">修改密碼</h5>
            </div>
            <div class="card-body">
                <form method="POST">
                    <input type="hidden" name="change_password" value="1">
                    <div class="mb-3">
                        <label class="form-label">原密碼</label>
                        <input type="password" class="form-control" name="old_password" required>
                    </div>
                    <div class="mb-3">
                        <label class="form-label">新密碼</label>
                        <input type="password" class="form-control" name="new_password" required>
                    </div>
                    <div class="mb-3">
                        <label class="form-label">確認新密碼</label>
                        <input type="password" class="form-control" name="confirm_password" required>
                    </div>
                    <button type="submit" class="btn btn-primary">保存修改</button>
                </form>
            </div>
        </div>
    </div>

    <!-- 网站设置 -->
    <div class="col-md-6">
        <div class="card">
            <div class="card-header">
                <h5 class="card-title mb-0">網站設置</h5>
            </div>
            <div class="card-body">
                <form method="POST">
                    <input type="hidden" name="update_settings" value="1">
                    <div class="mb-3">
                        <label class="form-label">網站標題</label>
                        <input type="text" class="form-control" name="site_title" 
                               value="{{ settings.site_title if settings else '日創科技' }}">
                    </div>
                    <div class="mb-3">
                        <label class="form-label">聯繫電話</label>
                        <input type="text" class="form-control" name="contact_phone" 
                               value="{{ settings.contact_phone if settings else '+852-97046393' }}">
                    </div>
                    <div class="mb-3">
                        <label class="form-label">聯繫郵箱</label>
                        <input type="email" class="form-control" name="contact_email" 
                               value="{{ settings.contact_email if settings else 'imiracle2024@hotmail.com' }}">
                    </div>
                    <div class="mb-3">
                        <label class="form-label">公司地址</label>
                        <textarea class="form-control" name="company_address" rows="2">{{ settings.company_address if settings else '' }}</textarea>
                    </div>
                    <div class="mb-3">
                        <label class="form-label">版權信息</label>
                        <input type="text" class="form-control" name="copyright" 
                               value="{{ settings.copyright if settings else '© 2024 日創科技. All rights reserved.' }}">
                    </div>
                    <button type="submit" class="btn btn-primary">保存設置</button>
                </form>
            </div>
        </div>
    </div>
</div>

<!-- 其他设置卡片 -->
<div class="row mt-4">
    <div class="col-12">
        <div class="card">
            <div class="card-header">
                <h5 class="card-title mb-0">其他設置</h5>
            </div>
            <div class="card-body">
                <div class="alert alert-info">
                    <i class="fas fa-info-circle"></i> 更多設置功能開發中...
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %} 